FactoryGirl.define do
  sequence(:name) { |i| "node#{i}" }

  factory :node, class: "CanCamel::Node" do
    name

    condition { { "#{name}_condition".to_sym => {} } }
    result { { "#{name}_result".to_sym => "#{name}" } }

    factory :subject_node, class: "CanCamel::SubjectNode"
    factory :action_node, class: "CanCamel::ActionNode"
    factory :group_node, class: "CanCamel::GroupNode"
    factory :concern_node, class: "CanCamel::ConcernNode"
  end

  factory :user do
    name
    group :camel
  end
end
